package com.king.designpatterns.创造型模式.建造者模式;

/**
 * X201具体建造者
 *
 * @author king
 * @date 2021-06-07 17:21
 */
public class X201Builder implements ComputerBuilder {
    private X201 computer = new X201();

    @Override
    public void buildCpu() {
        computer.setCpu("i3-350");
    }

    @Override
    public void buildRam() {
        computer.setRam("2GB 1333MHz");
    }

    @Override
    public void buildHardDisk() {
        computer.setHardDisk("250GB 5400转");
    }

    @Override
    public void buildGraphicCard() {
        // 无显卡
    }

    @Override
    public void buildMonitor() {
        computer.setMonitor("12英寸 1280*800");
    }

    @Override
    public void buildOs() {
        computer.setOs("Windows 7 Home版");
    }

    @Override
    public Computer getResult() {
        return computer;
    }
}
